package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.mybatis.base.BaseModel;
import com.hq.web.penum.EnumDeviceType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * jiang bai ping
 *
 * @Email 526666031@qq.com
 * @Detail 用户登录日志
 */
@Data
@Alias("LogUserLoginInfo")
@TableName(value = "log_user_login_info")
@ApiModel(value = "用户登录日志")
public class LogUserLoginInfo extends BaseModel<LogUserLoginInfo> implements Serializable {

    @ApiModelProperty(value = "主链")
    @TableId(value = "`log_user_login_info_id`", type = IdType.ASSIGN_UUID)
    private String logUserLoginInfoId;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "`create_date_time`", fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "`update_date_time`", fill = FieldFill.INSERT_UPDATE)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDateTime;

    @ApiModelProperty(value = "创建人名称")
    @TableField(value = "`create_user_name`", fill = FieldFill.INSERT)
    private String createUserName;

    @ApiModelProperty(value = "更新人名称")
    @TableField(value = "`update_user_name`", fill = FieldFill.INSERT_UPDATE)
    private String updateUserName;

    @ApiModelProperty(value = "用户id")
    @TableField(value = "`user_id`")
    private String userId;

    @ApiModelProperty(value = "登陆设备")
    private EnumDeviceType loginEquipment;

    @ApiModelProperty(value = "登陆IP")
    @TableField(value = "`login_ip`")
    private String loginIp;

    @ApiModelProperty(value = "公司id")
    @TableField(value = "`company_id`")
    private String companyId;

    @ApiModelProperty(value = "用户姓名")
    @TableField(value = "`user_name`")
    private String userName;

    @ApiModelProperty(value = "用户登录账号")
    @TableField(value = "`user_account`")
    private String userAccount;

    @ApiModelProperty(value = "是否删除")
    @TableField(value = "`is_del`")
    private Boolean isDel;
}
